﻿using DeviceAdapter.Util;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using System.Web.WebPages;

namespace lwzlz.Web
{
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            //移动设备显示模式监测器
            DisplayModeProvider.Instance.Modes.Insert(0, new CustomMobiDisplayMode());

            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            // 注册AutoMapper配置
            MapperConfig.Register();
            // 配置Log4net
            Common.LogHelper.Init();
        }
    }
}
